/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #F8F4E3;
    color: #2E282A;
    line-height: 1.6;
    overflow-x: hidden;
}

#app {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    background-color: #F8F4E3;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.page {
    min-height: 100vh;
    position: relative;
    padding-bottom: 60px; /* 为底部导航留出空间 */
    transition: opacity 0.3s ease-in-out;
    background-image: url('images/paper-texture.png');
    background-blend-mode: overlay;
    background-size: 200px;
}

.page.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 欢迎页 - 月老场景 */
.yuelao-scene {
    height: 75vh;
    position: relative;
    background: linear-gradient(to bottom, #f8e7e7, #F8F4E3);
    overflow: hidden;
}

.yuelao-figure {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 100%;
    text-align: center;
}

.yuelao-image {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    animation: floatYuelao 6s ease-in-out infinite;
}

@keyframes floatYuelao {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.speech-bubble {
    position: relative;
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    margin: 20px auto 0;
    max-width: 80%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: pulseBubble 3s ease-in-out infinite;
}

.speech-bubble:after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 15px 15px;
    border-style: solid;
    border-color: transparent transparent #fff;
}

.speech-bubble p {
    margin: 5px 0;
    font-size: 16px;
    color: #E54B4B;
}

@keyframes pulseBubble {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.red-threads {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.thread {
    position: absolute;
    background-color: #E54B4B;
    opacity: 0.7;
    transform-origin: top center;
}

.thread-1 {
    width: 2px;
    height: 40%;
    top: 30%;
    left: 25%;
    animation: swingThread 8s ease-in-out infinite;
}

.thread-2 {
    width: 2px;
    height: 35%;
    top: 35%;
    left: 50%;
    animation: swingThread 7s ease-in-out infinite 1s;
}

.thread-3 {
    width: 2px;
    height: 45%;
    top: 25%;
    left: 75%;
    animation: swingThread 9s ease-in-out infinite 0.5s;
}

@keyframes swingThread {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.envelope-floating {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 8;
    overflow: hidden;
}

.envelope-1 {
    bottom: 20%;
    left: 25%;
    transform: translateX(-50%) rotate(-5deg);
    animation: floatEnvelope 7s ease-in-out infinite;
}

.envelope-2 {
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%) rotate(3deg);
    animation: floatEnvelope 8s ease-in-out infinite 1s;
}

.envelope-3 {
    bottom: 18%;
    left: 75%;
    transform: translateX(-50%) rotate(-8deg);
    animation: floatEnvelope 9s ease-in-out infinite 0.5s;
}

@keyframes floatEnvelope {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(-5deg); }
    50% { transform: translateX(-50%) translateY(-15px) rotate(5deg); }
}

.envelope-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.envelope-price {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: #F9C846;
    color: #2E282A;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.welcome-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25vh;
    background-color: #F8F4E3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.app-title {
    font-size: 32px;
    color: #E54B4B;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.app-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.swipe-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInOut 2s ease-in-out infinite;
}

.swipe-text {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}

.swipe-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 20px;
}

.swipe-arrow span {
    display: block;
    width: 12px;
    height: 12px;
    border-left: 2px solid #E54B4B;
    border-bottom: 2px solid #E54B4B;
    transform: rotate(-135deg);
    margin: -6px;
    animation: swipeArrow 1.5s infinite;
}

.swipe-arrow span:nth-child(2) {
    animation-delay: 0.3s;
}

@keyframes swipeArrow {
    0% {
        opacity: 0;
        transform: rotate(-135deg) translate(0, 0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(-135deg) translate(-10px, -10px);
    }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 主页 - 月老主题设计 */
.yuelao-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(to right, #f8e7e7, #F8F4E3);
    border-bottom: 1px solid rgba(229, 75, 75, 0.2);
}

.yuelao-avatar {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    overflow: hidden;
    border: 2px solid #E54B4B;
    box-shadow: 0 3px 10px rgba(229, 75, 75, 0.3);
}

.yuelao-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yuelao-message {
    flex: 1;
    margin-left: 15px;
    position: relative;
    background-color: white;
    padding: 10px 15px;
    border-radius: 18px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.message-text {
    font-size: 14px;
    color: #2E282A;
}

.message-indicator {
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
}

.user-balance {
    background-color: #F9C846;
    color: #2E282A;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: bold;
    margin-left: 15px;
    box-shadow: 0 2px 5px rgba(249, 200, 70, 0.3);
}

.temple-scene {
    position: relative;
    padding: 20px 15px;
    background-color: #F8F4E3;
}

.temple-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/temple-bg.png') no-repeat center bottom;
    background-size: contain;
    opacity: 0.1;
    z-index: 0;
}

.envelope-shelf {
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.shelf-title {
    font-size: 20px;
    color: #E54B4B;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.shelf-title:before, .shelf-title:after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 2px;
    background: linear-gradient(to right, #E54B4B, transparent);
}

.shelf-title:before {
    left: 20%;
}

.shelf-title:after {
    right: 20%;
    transform: rotate(180deg);
}

.envelopes-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.envelope {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(50px);
    opacity: 0;
}

.envelope.animate-in {
    animation: slideEnvelopeIn 0.5s forwards ease-out;
}

@keyframes slideEnvelopeIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.envelope-front {
    position: relative;
    width: 100%;
    height: 180px;
}

.envelope-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.envelope-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 10px;
    color: white;
    display: flex;
    justify-content: space-between;
}

.tag-name {
    font-weight: bold;
}

.envelope-price-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #F9C846;
    color: #2E282A;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.action-buttons {
    display: flex;
    justify-content: space-around;
    padding: 20px 15px;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: 15px;
    padding: 15px;
    width: 30%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.action-button:active {
    transform: translateY(3px);
}

.button-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.button-text {
    font-size: 12px;
    text-align: center;
    color: #666;
}

.create-button .button-icon {
    color: #E54B4B;
}

.browse-button .button-icon {
    color: #F9C846;
}

.my-button .button-icon {
    color: #6A8D73;
}

.yuelao-quote-footer {
    text-align: center;
    padding: 15px;
    font-style: italic;
    color: #888;
    font-size: 14px;
    margin-top: 10px;
}

/* 导航栏样式 */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #F9C846;
}

.balance {
    background-color: #F9C846;
    color: #2E282A;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(249, 200, 70, 0.3);
}

/* 主要功能区样式 */
.main-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 20px;
}

.feature-card {
    width: 30%;
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover, .feature-card:active {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.feature-card img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #E54B4B;
}

.card-desc {
    font-size: 12px;
    color: #666;
}

/* 推荐区样式 */
.recommendation {
    padding: 15px;
    background-color: white;
    margin: 0 15px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2E282A;
    position: relative;
    padding-left: 15px;
}

.section-title:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background-color: #E54B4B;
    border-radius: 3px;
}

.envelope-scroll {
    display: flex;
    overflow-x: auto;
    padding: 5px 0 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.envelope-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.envelope-item {
    flex: 0 0 auto;
    width: 120px;
    margin-right: 15px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.envelope-item:hover, .envelope-item:active {
    transform: translateY(-3px);
}

.envelope-preview {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.envelope-price {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(249, 200, 70, 0.9);
    color: #2E282A;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 增强红线连接效果 */
.envelope-item:not(:last-child):after {
    content: '';
    position: absolute;
    height: 2px;
    background: linear-gradient(to right, #E54B4B, transparent);
    right: -15px;
    top: 50%;
    width: 30px;
    animation: redLinePulse 2s infinite;
}

@keyframes redLinePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* 底部导航栏 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background-color: white;
    padding: 8px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
    z-index: 100;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #999;
    cursor: pointer;
    padding: 5px 0;
    width: 33.33%;
    transition: color 0.3s ease;
}

.tab-item img {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.tab-item.active {
    color: #E54B4B;
}

.tab-item.active img {
    opacity: 1;
}

/* 浏览页面样式 */
.browse-container {
    padding: 15px;
    padding-bottom: 70px;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    background-color: white;
    border-radius: 20px;
    padding: 5px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filter {
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter.active {
    background-color: #E54B4B;
    color: white;
    box-shadow: 0 2px 4px rgba(229, 75, 75, 0.3);
}

.envelopes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.envelope-card {
    background: linear-gradient(135deg, #fff 85%, #f8e7e7 100%);
    border: 1px solid rgba(229, 75, 75, 0.2);
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.envelope-card:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, transparent 50%, #E54B4B 50%);
    border-radius: 0 0 0 5px;
    z-index: 1;
}

.envelope-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.envelope-info {
    padding: 10px;
}

.envelope-name {
    font-size: 16px;
    font-weight: bold;
    color: #2E282A;
}

.envelope-age {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

/* 信封预览页样式 */
.preview-container {
    padding: 15px;
    padding-bottom: 70px;
}

.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.back-btn {
    font-size: 16px;
    color: #2E282A;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: bold;
}

.envelope-preview {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.envelope-basic-info {
    margin: 15px 0;
}

.info-row {
    display: flex;
    margin-bottom: 8px;
}

.info-label {
    width: 60px;
    font-weight: bold;
    color: #666;
}

.info-value {
    flex: 1;
    color: #2E282A;
}

.envelope-description {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.blur-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 10px 10px;
}

.blur-text {
    background-color: rgba(229, 75, 75, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.buy-btn, .submit-btn, .start-btn, .recharge-btn {
    background: linear-gradient(to right, #E54B4B, #e06666);
    border-radius: 25px;
    padding: 12px 30px;
    color: white;
    font-weight: bold;
    border: none;
    box-shadow: 0 4px 15px rgba(229, 75, 75, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.buy-btn:before, .submit-btn:before, .start-btn:before, .recharge-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.buy-btn:hover:before, .submit-btn:hover:before, .start-btn:hover:before, .recharge-btn:hover:before {
    left: 100%;
}

.hint-text {
    text-align: center;
    font-size: 12px;
    color: #888;
}

/* 信封详情页样式 */
.detail-container {
    padding-bottom: 70px;
}

.photo-swiper {
    width: 100%;
    height: 300px;
    position: relative;
    margin-bottom: 15px;
}

.photo-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 3px;
}

.dot.active {
    background-color: white;
    width: 10px;
    height: 10px;
}

.envelope-info {
    background-color: white;
    border-radius: 15px 15px 0 0;
    padding: 20px 15px;
    margin-top: -15px;
    position: relative;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.1);
}

.info-header {
    margin-bottom: 20px;
}

.name-age {
    display: flex;
    align-items: baseline;
    margin-bottom: 5px;
}

.name {
    font-size: 22px;
    font-weight: bold;
    margin-right: 10px;
}

.age {
    font-size: 16px;
    color: #666;
}

.location {
    font-size: 14px;
    color: #888;
}

.info-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2E282A;
}

.section-content {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.contact-section {
    position: relative;
}

.copy-btn {
    position: absolute;
    right: 0;
    top: 10px;
    background-color: #F9C846;
    color: #2E282A;
    border: none;
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(249, 200, 70, 0.3);
}

.action-buttons {
    display: flex;
    justify-content: space-between;
}

.report-btn, .favorite-btn {
    width: 48%;
    padding: 10px 0;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.report-btn {
    background-color: #f5f5f5;
    color: #888;
}

.favorite-btn {
    background-color: #E54B4B;
    color: white;
    box-shadow: 0 2px 5px rgba(229, 75, 75, 0.3);
}

/* 创建信封页面样式 */
.create-container {
    padding: 15px;
    padding-bottom: 70px;
}

.form-title {
    font-size: 20px;
    font-weight: bold;
    margin: 15px 0;
    color: #E54B4B;
    text-align: center;
}

.form-group {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.form-label {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2E282A;
}

.photo-upload-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.add-photo {
    width: 80px;
    height: 80px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #ccc;
    cursor: pointer;
}

input, textarea, .picker {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

textarea {
    height: 100px;
    resize: none;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.contact-hint {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.submit-btn {
    background-color: #E54B4B;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 0;
    font-size: 16px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(229, 75, 75, 0.3);
    margin-top: 20px;
    transition: all 0.3s ease;
}

/* 我的信封页面样式 */
.my-envelopes-container {
    padding: 15px;
    padding-bottom: 70px;
}

.my-tab-bar {
    position: static;
    background-color: #f5f5f5;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    padding: 5px;
}

.my-tab-bar .tab {
    width: 50%;
    text-align: center;
    padding: 10px 0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.my-tab-bar .tab.active {
    background-color: #E54B4B;
    color: white;
    box-shadow: 0 2px 4px rgba(229, 75, 75, 0.3);
}

.envelope-list {
    margin-top: 15px;
}

.envelope-list .envelope-item {
    display: flex;
    background-color: white;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.envelope-list .envelope-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.envelope-list .envelope-info {
    flex: 1;
}

.envelope-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2E282A;
}

.envelope-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.envelope-date {
    font-size: 12px;
    color: #888;
}

.envelope-contact {
    font-size: 12px;
    color: #E54B4B;
    margin-bottom: 5px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    color: #888;
}

.empty-state img {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state button {
    background-color: #E54B4B;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    margin-top: 15px;
    font-size: 14px;
    cursor: pointer;
}

.recharge-entry {
    position: fixed;
    right: 20px;
    bottom: 80px;
    background-color: #F9C846;
    width: 50px;
    height: 50px;
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(249, 200, 70, 0.4);
    cursor: pointer;
    z-index: 10;
}

.recharge-entry img {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

.recharge-entry span {
    font-size: 10px;
    color: #2E282A;
}

/* 充值页面样式 */
.recharge-container {
    padding: 15px;
}

.balance-display {
    background-color: #E54B4B;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 3px 8px rgba(229, 75, 75, 0.3);
    color: white;
}

.balance-label {
    font-size: 14px;
    margin-bottom: 5px;
}

.balance-amount {
    font-size: 30px;
    font-weight: bold;
}

.recharge-options {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.option-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2E282A;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.option-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item.selected {
    border-color: #E54B4B;
    background-color: rgba(229, 75, 75, 0.05);
    box-shadow: 0 2px 5px rgba(229, 75, 75, 0.2);
}

.amount {
    font-size: 18px;
    font-weight: bold;
    color: #2E282A;
    margin-bottom: 5px;
}

.description {
    font-size: 12px;
    color: #888;
}

.custom-amount {
    margin-top: 15px;
}

.custom-label {
    font-size: 14px;
    margin-bottom: 8px;
    color: #666;
}

.recharge-btn {
    background-color: #E54B4B;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 0;
    font-size: 16px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(229, 75, 75, 0.3);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.recharge-tips {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
}

.tip-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #666;
}

.tip-item {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
}

.tip-item:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #E54B4B;
}

/* 响应式调整 */
@media (max-width: 360px) {
    .feature-card {
        width: 48%;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
}

/* 月老元素装饰 - 页面顶部 */
.page:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: url('images/chinese-border.png') repeat-x;
    background-size: contain;
    opacity: 0.8;
    z-index: 5;
}

/* 红线牵引动画 */
@keyframes redLineFloat {
    0% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
    100% { transform: translateY(0) rotate(-2deg); }
}

/* 信封打开动画 */
@keyframes envelopeOpen {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.envelope-card:active {
    animation: envelopeOpen 0.5s ease-out;
}

/* 浮动心形元素 */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.floating-heart {
    position: absolute;
    color: rgba(229, 75, 75, 0.2);
    font-size: 24px;
    animation: floatHeart 15s linear infinite;
}

.floating-heart:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-duration: 15s;
    animation-delay: 0s;
}

.floating-heart:nth-child(2) {
    top: 50%;
    left: 75%;
    animation-duration: 18s;
    animation-delay: 2s;
}

.floating-heart:nth-child(3) {
    top: 80%;
    left: 30%;
    animation-duration: 20s;
    animation-delay: 5s;
}

.floating-heart:nth-child(4) {
    top: 35%;
    left: 85%;
    animation-duration: 17s;
    animation-delay: 1s;
    font-size: 18px;
}

.floating-heart:nth-child(5) {
    top: 15%;
    left: 45%;
    animation-duration: 22s;
    animation-delay: 3s;
    font-size: 16px;
}

.floating-heart:nth-child(6) {
    top: 65%;
    left: 15%;
    animation-duration: 19s;
    animation-delay: 7s;
    font-size: 20px;
}

.floating-heart:before {
    content: '❤';
}

@keyframes floatHeart {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 红线元素 */
.red-thread {
    position: absolute;
    width: 2px;
    background-color: #E54B4B;
    height: 50px;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
}

/* 欢迎页引言 */
.welcome-footer {
    position: absolute;
    bottom: 30px;
    width: 100%;
    text-align: center;
}

.welcome-quote {
    font-family: 'Noto Serif SC', serif;
    font-style: italic;
    color: #888;
    font-size: 14px;
}

/* 按钮内部图标 */
.btn-text {
    margin-right: 8px;
}

.btn-icon {
    font-size: 14px;
}

/* 月老引言 */
.yuelao-quote {
    font-size: 14px;
    color: #E54B4B;
    font-style: italic;
}

/* 红线装饰 */
.red-thread-decoration {
    height: 3px;
    background: linear-gradient(to right, transparent, #E54B4B, transparent);
    margin: 0 30px 15px;
    position: relative;
}

.red-thread-decoration:before, .red-thread-decoration:after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E54B4B;
    top: -2.5px;
    box-shadow: 0 0 5px rgba(229, 75, 75, 0.5);
}

.red-thread-decoration:before {
    left: 30%;
}

.red-thread-decoration:after {
    right: 30%;
}

/* 标题图标 */
.title-icon {
    font-size: 14px;
    color: #E54B4B;
    margin: 0 5px;
}

/* 信封样式增强 */
.envelope-preview {
    position: relative;
    transition: all 0.3s ease;
}

.envelope-preview:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 70%, rgba(229, 75, 75, 0.1));
    border-radius: 8px;
    pointer-events: none;
}

/* 心形脉动效果 */
.pulsing-heart {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    color: #E54B4B;
    font-size: 28px;
    animation: heartPulse 1.5s ease-in-out infinite;
    opacity: 0.8;
    z-index: 2;
}

@keyframes heartPulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.2); }
    100% { transform: translateX(-50%) scale(1); }
}

/* 红线上的心形装饰 */
.red-thread:before, .red-thread:after {
    content: '❤';
    position: absolute;
    color: #E54B4B;
    font-size: 12px;
    left: 50%;
    transform: translateX(-50%);
}

.red-thread:before {
    top: -15px;
}

.red-thread:after {
    bottom: -15px;
}

/* 下拉指示器样式 */
.swipe-indicator {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInOut 2s ease-in-out infinite;
}

.swipe-text {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}

.swipe-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 30px;
}

.swipe-arrow span {
    display: block;
    width: 15px;
    height: 15px;
    border-left: 2px solid #E54B4B;
    border-bottom: 2px solid #E54B4B;
    transform: rotate(-45deg);
    margin: -8px;
    animation: swipeArrow 1.5s infinite;
}

.swipe-arrow span:nth-child(2) {
    animation-delay: 0.2s;
}

.swipe-arrow span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes swipeArrow {
    0% {
        opacity: 0;
        transform: rotate(-45deg) translate(0, 0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(-45deg) translate(10px, 10px);
    }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 信封卡片红线效果 */
.envelope-card {
    position: relative;
}

.envelope-card:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #E54B4B, transparent);
    bottom: -5px;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.envelope-card:hover:after {
    opacity: 0.7;
}

/* 月老图案背景增强 */
.page {
    position: relative;
}

.page:after {
    content: '';
    position: absolute;
    bottom: 70px;
    right: 15px;
    width: 80px;
    height: 80px;
    background: url('images/yuelao-icon.png') no-repeat center center;
    background-size: contain;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

/* 红线装饰增强 */
.red-thread-decoration {
    position: relative;
}

.red-thread-decoration:before, .red-thread-decoration:after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E54B4B;
    top: -2.5px;
    box-shadow: 0 0 5px rgba(229, 75, 75, 0.5);
} 